<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>

<form:form commandName="formHeads" cssClass="form-horizontal" role="form" onsubmit="return false;">
    <div class="form-group" style="padding-left: 50px;">
        <div class="checkbox col-sm-2 ">
            <input type="checkbox" id="checkAll" name="" value="">
            <label for="checkAll" class="no-padding">全选</label>
        </div>
    </div>
    <div class="form-group" style="padding-left: 50px;">
        <div class="checkbox col-sm-2 ">
            <input type="checkbox" id="branchs" name="exportHead" value="branch">
            <label for="branchs" class="no-padding">单位</label>
        </div>

        <div class="checkbox col-sm-2 ">
            <input type="checkbox" id="roles" name="exportHead" value="role">
            <label for="roles" class="no-padding">角色</label>
        </div>

        <div class="checkbox col-sm-2 ">
            <input type="checkbox" id="userNames" name="exportHead" value="userName">
            <label for="userNames" class="no-padding">姓名</label>
        </div>

        <div class="checkbox col-sm-2 ">
            <input type="checkbox" id="phones" name="exportHead" value="phone">
            <label for="phones" class="no-padding">联系电话</label>
        </div>

    </div>

</form:form>

<script>

    $(function () {
        $("#checkAll").click(function () {
            $("input[name='exportHead']").prop("checked", $(this).prop("checked"));
        });

    })
</script>



